
package com.productpricemiddlemodule.bean;

import java.io.Serializable;

import com.pricemodule.bean.TbPrice;
import com.pricemodule.dao.TbPriceDAO;
import com.productmodule.bean.TbProduct;
import com.productmodule.dao.TbProductDAO;
import com.usersmodule.bean.TbUsers;
import com.usersmodule.dao.TbUsersDAO;

public class TbProductPriceMiddle implements Serializable{

    private int productPriceMiddleId;

    private int productId;
    private TbProduct tbProduct;
    private int priceId;
    private TbPrice tbPrice;
    private int userId;
    private TbUsers tbUsers;

    public int getProductPriceMiddleId(){
        return productPriceMiddleId;
    }

    public void setProductPriceMiddleId(int productPriceMiddleId){
        this.productPriceMiddleId = productPriceMiddleId;
    }

    public int getProductId(){
        return productId;
    }

    public void setProductId(int productId){
        this.productId = productId;
        this.tbProduct=new TbProductDAO().getTbProductByProductId(productId);
    }

    public int getPriceId(){
        return priceId;
    }

    public void setPriceId(int priceId){
        this.priceId = priceId;
        this.tbPrice=new TbPriceDAO().getTbPriceByPriceId(priceId);
    }

    public int getUserId(){
        return userId;
    }

    public void setUserId(int userId){
        this.userId = userId;
        this.tbUsers=new TbUsersDAO().getTbUsersByUserId(userId);
    }

    
    public TbProduct getTbProduct() {
		return tbProduct;
	}

	public void setTbProduct(TbProduct tbProduct) {
		this.tbProduct = tbProduct;
	}

	public TbPrice getTbPrice() {
		return tbPrice;
	}

	public void setTbPrice(TbPrice tbPrice) {
		this.tbPrice = tbPrice;
	}

	public TbUsers getTbUsers() {
		return tbUsers;
	}

	public void setTbUsers(TbUsers tbUsers) {
		this.tbUsers = tbUsers;
	}

	public TbProductPriceMiddle(){
    }
        public TbProductPriceMiddle(int productId,int priceId,int userId){
        this.productId = productId;
        this.priceId = priceId;
        this.userId = userId;
    }
    public TbProductPriceMiddle(int productPriceMiddleId,int productId,int priceId,int userId){
        this.productPriceMiddleId = productPriceMiddleId;
        this.productId = productId;
        this.priceId = priceId;
        this.userId = userId;
    }
}

